import React from 'react';
import { withRouter, Redirect } from 'react-router-dom'
import './css/NoListData.less'

class NoListData extends React.PureComponent {
    constructor(props) {
        super(props)
        this.state = {

        }
    }


    render() {
        var { params } = this.props
        return (
            <div id="NoListData">
                <img className="showImg" src={params.imgUrl} alt="" />
                <div className="showText">
                    <div className="showTextTitle">{params.title}</div>
                    <div className="showTextBrief">{params.brief}</div>
                </div>
                {
                    params.url ? <button className="goHref" onClick={() => {
                        this.props.history.push(params.url)
                    }}>{params.btnText}</button> : ''
                }

            </div>
        )
    }
}

export default withRouter(NoListData)